<?php
require __DIR__ . '/DB.php';
$db = new DB();
$db->__setup([
'dsn'=>'mysql:dbname=silent;host=den1.mysql4.gear.host',
'username'=>'silent',
'password'=>'Hj0ky28?-7TF',
'charset'=>'utf8'
]);
//$con = mysqli_connect("den1.mysql4.gear.host", "silent", "Hj0ky28?-7TF");

$user = $db->fetch('SELECT * FROM user where id = :id', ['id' => 1]);
echo $user['name'];

//$insertId = $db->insert('user', ['name' => 'salamander', 'face' => "1,jpg","account"=>"110","password"=>"admin"]);
//echo "insert user {$insertId}\n";

//$users = $db->fetchAll('SELECT * FROM user');
//foreach ($users as $item) {
//echo "user {$item['id']} is {$item['name']} \n";
//}